Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ensure that all packages have comments #547

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Mar 11, 2025

This mirrors an internal linter, though this linter requires that the package comment be in a file that is not ignored e.g. due to go:build conditions, meaning it considers a few packages as missing comments as they're in a Windows-only file.

Currently, I've addressed that by copying the comment into a non-Windows file without removing the previous comment, though we might want to discuss what convention we actually follow - I think there's at least two possible ones to consider:

  1. always put the comment in all files in a go:build "set" i.e. xyz_dummy.go and xyz_windows.go (downside being we're having to maintain the comment twice)
  2. always put the package comment in a file that is never ignored when possible (possible downside is that often that can be a file holding utilities rather than the actual meat of the package, and if there isn't such a file then we'd have to do 1. anyway)

Relates to #455
Relates to #274

@G-Rath G-Rath force-pushed the linting/enforce-package-comment branch from 0f04cf8 to 02fa7e5 Compare March 12, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant